package com.neu.fenli2023623.service.impl;

import com.neu.fenli2023623.dto.RoleDto;
import com.neu.fenli2023623.entity.Role;
import com.neu.fenli2023623.mapper.RoleMapper;
import com.neu.fenli2023623.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleServiceImpl implements RoleService {
    @Autowired
    private RoleMapper roleMapper;
    @Override
    public List<Role> selectAll(RoleDto role) {
        return roleMapper.selectAll(role);
    }

    @Override
    public int insertSelective(Role role) {
        return roleMapper.insertSelective(role);
    }

    @Override
    public int del(Long id) {
        return roleMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int update(Role role) {
        return roleMapper.updateByPrimaryKeySelective(role);
    }

    @Override
    public List<Role> selectExportData(Role role) {
        return roleMapper.selectExportData(role);
    }
}
